// 医院设置相关api函数
import {request} from '@utils/http'
import { IHospitalSetAdd, IHospitalSetListResponse } from './model/hospitalSetType'

// 获取医院设置列表数据
export const getHospitalSetList = (page: number, limit:number, hosname?:string,hoscode?: string)=> {
    return request.get<any, IHospitalSetListResponse>(`/admin/hosp/hospitalSet/${page}/${limit}`, {
        params: {
            hosname,
            hoscode
        }
    })
}

// 添加医院列表
export const addHospitalSetList = (data: IHospitalSetAdd)=> {
    return request.post<any,null>('/admin/hosp/hospitalSet/save', data)
}

// 根据id删除医院列表数据
export const delHospitalSetById = (id: string) => {
    return request.delete<any,null>(`/admin/hosp/hospitalSet/remove/${id}`)
}

// 批量删除数据
export const delHospitalSetList = (ids: React.Key[]) => {
    return request.delete<any,null>(`/admin/hosp/hospitalSet/batchRemove`, {
        data: ids
    })
}

// 获取医院详情数据
export const getHospitalSetById = (id: string) => {
    return request.get<any,IHospitalSetListResponse>(`/admin/hosp/hospitalSet/get/${id}`)
}

// 更新医院列表数据
export const updateHosoplistSetList = (data:IHospitalSetAdd) => {
    return request.put<any,null>(`/admin/hosp/hospitalSet/update`, data)
}




